package com.tinywind.Sword.Service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tinywind.Sword.Dao.UserDao;
import com.tinywind.Sword.Entity.TokenEntity;
import com.tinywind.Sword.Entity.UserEntity;
import com.tinywind.Sword.Service.UserService;

@Service
public class UserServiceImpl implements UserService {

//	private Logger logger = LoggerFactory.getLogger(this.getClass());

	// 注入Service依赖
	@Autowired
	private UserDao mDao;

	
	@Override
	public UserEntity login(String account,String password) {
		UserEntity entity = mDao.searchByAccount(account);
		return entity;
	}
	
	public void insertToken(TokenEntity token) {
		mDao.insertToken(token);
	}
}
